home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
United Public Domain Gold 2
/
United Public Domain Gold 2.iso
/
utilities
/
pu721.dms
/
pu721.adf
/
Compress
next >
Wrap
Text File
|
1978-05-02
|
15KB
|
567 lines
;;
;; EPU-Stakker Installation
;;
;; by S.Tavener - National Amiga Users Group
;;
;; DATE : 8/9/94
;; REVISION NO. : v1.70
;;
;; © Installer Routine Copyright to Stuart Tavener
(set @default-dest "WorkBench:")
(set intro
(cat
"\n\nNational Amiga Users Group\n"
"Presents\n"
"EPU Stakker Installation\n"
"Compiled by Stuart Tavener.June 1994\n"
"\n\nINSTRUCTIONS.\n "
"BOOT from the Device that you wish to Compress,\n"
"Then Execute this Installation.\n"
"(The SYSTEM files will be copied to your Boot Drive)"
)
)
(set asklib-help
(cat "EPU Stakker can use a variety of Compression "
"Techniques, they will ALL give some advantage. "
"If you have enough room then Install them All "
"as Librarys such as NONE will come in usefull "
"for Decompressing Files at later dates.\n"
"\nEPU0 - Bog Standard, very basic."
"\nEPU1 - Only Slighty Better."
"\nNUKE - Best Overall, achieves 600K/second\n"
" Decompression at around 50% average on most\n"
" files. We recommend you to use NUKE."
"\nRDCN - Medium, gets up to 800K/second but averages\n around 35% Compression."
"\nBLZM - Quite slow, 300K/second Decompression,\n Compression of 24-33%."
"\nFAST - Very Fast Compression and Decompression\n around 1Meg/second!!, but only reaches 30-35%\n Compression."
"\nSHRI - Reasonable 42-53% Compression but fairly Slow\n Algorithms."
"\nNONE - Use to Return files back to 0% Compression\n De-Compresses your drive to Normal."
)
)
(set installlibs (cat "Choose One or More Compression Librarys to Install to SYS:libs\nHELP gives more Detailed Information\n")
)
(set deflib (cat " - NOT Installed"))
(set devices-help
(cat "This Allows You to select a different Partition or "
"Device to Compress,\n\n"
"HARDDISK USERS are advised to NOT Compress their "
"Boot (SYS:) drive as this will slow-down Boot-up time "
"and may cause problems with libraries/handlers.\n\n"
"FLOPPY DRIVE users can just select DF0: or similar,"
"but this section does allow Compression of ANY "
"disk, but remember that it can only be used with a "
"'Boot disk' running the EPU Stakker Program with the "
"relevant Compression Librarys. Therefore if this is "
"Intended, you should select to Install ALL "
"Compression Librarys on to the main 'Boot disk'"
)
)
(set startupfileerr (cat "\n\n\nYou Have no Startup-sequence on this Disk!"
"\nSo EPU cannot be Installed !!")
)
(set again (cat "\n\n\n\n\n\n\ Do You want to Install / Compress Another Device ?"))
(set reboot (cat "\n\n\n\n To Take Effect of EPU Stakker"
"\n Re-Boot Your Computer NOW"
)
)
;-----------------------------------------------------------
(complete 0)
(message intro)
(welcome)
;ask which device to compress, mainly for HD users.
(set @default-dest
(askdir
(prompt "\nPlease Choose the Device to Install the EPU Program\n")
(help devices-help)
(default "Workbench:")
)
)
;copy this for executing scripts
(if (exists (tackon @default-dest "execute"))
(set null 0)
(copyfiles
(source "Stakker:C/execute")
(dest @default-dest)
(optional "force")
)
)
(complete 10)
(
(copyfiles
(prompt "\n" "copying EPU system files to SYS:")
(help "")
(source "Stakker:l/EPU1.handler")
(dest (tackon @default-dest "L"))
(optional "force")
)
(complete 15)
(copyfiles
(source "Stakker:l/EPU2.handler")
(dest (tackon @default-dest "L"))
(optional "force")
)
(complete 20)
(copyfiles
(source "Stakker:l/EPU3.handler")
(dest (tackon @default-dest "L"))
(optional "force")
)
(complete 25)
(copyfiles
(source "Stakker:EPU")
(dest @default-dest)
(optional "force")
)
(complete 30)
(copyfiles
(source "Stakker:recomp")
(dest @default-dest)
(optional "force")
)
(if (exists (tackon @default-dest "T"))
(set null 0)
(makedir (tackon @default-dest "T"))
)
(if (= @user-level 1) ; the user-level is Intermediate (1) then setup automatically
;then
(
(copyfiles
(source "Stakker:libs/xpkNUKE.library")
(dest (tackon @default-dest "libs"))
(optional "force")
)
(copyfiles
(source "Stakker:libs/xpkNONE.library")
(dest (tackon @default-dest "libs"))
(optional "force")
)
)
;else - user level Expert then let user decide what files to copy
(
(set libflag
(askoptions
(prompt installlibs)
(help asklib-help)
(choices
"EPU0"
"EPU1"
"NUKE"
"RDCN"
"BLZW"
"FAST"
"SHRI"
"NONE"
(default -1) ;all libs
)
)
)
; install required compression librarys
(if (IN libflag 0)
(copyfiles
(source "Stakker:libs/EPU0.library")
(dest (tackon @default-dest "libs"))
(optional "force")
)
)
(if (IN libflag 1)
(copyfiles
(source "Stakker:libs/EPU1.library")
(dest (tackon @default-dest "libs"))
(optional "force")
)
)
(if (IN libflag 0 1)
(copyfiles
(source "Stakker:libs/lh.library")
(dest (tackon @default-dest "libs"))
(optional "force")
)
)
(if (IN libflag 2)
(copyfiles
(source "Stakker:libs/xpkNUKE.library")
(dest (tackon @default-dest "libs"))
(optional "force")
)
)
(if (IN libflag 3)
(copyfiles
(source "Stakker:libs/xpkRDCN.library")
(dest (tackon @default-dest "libs"))
(optional "force")
)
)
(if (IN libflag 4)
(copyfiles
(source "Stakker:libs/xpkBLZW.library")
(dest (tackon @default-dest "libs"))
(optional "force")
)
)
(if (IN libflag 5)
(copyfiles
(source "Stakker:libs/xpkFAST.library")
(dest (tackon @default-dest "libs"))
(optional "force")
)
)
(if (IN libflag 6)
(copyfiles
(source "Stakker:libs/xpkSHRI.library")
(dest (tackon @default-dest "libs"))
(optional "force")
)
)
(if (IN libflag 7)
(copyfiles
(source "Stakker:libs/xpkNONE.library")
(dest (tackon @default-dest "libs"))
(optional "force")
)
)
)
;-------------------------------------------------------------
)
)
(complete 35)
;------------------------------------------------------------
(set install 1)
(complete 36)
;do this while not wanting to quit at end of script
(while install
(set out 0)
;ask which device to compress, mainly for HD users.
(set installdevice
(askdir
(prompt "\nPlease Select Device or Partition to Compress\n")
(help "This section allows you to choose which drive/device "
"you want to compress.\n\n"
"HARD DISK users can pick any partition (See documents "
"before compressing your Workbench partition).\n\n"
"FLOPPY DISK users should pick the SAME device (disk) "
"that they chose at the last option - See Docs!."
)
(default "Work:")
(disk)
)
)
(complete 37)
;-----------------------------------------------------------
(set libcheck 1)
(set selectlib 1)
(if (= @user-level 1) ; the user-level is Intermediate (1) then just copy default lib.
;then
(
(set lib "NUKE")
(set len (- (strlen installdevice) 1))
(set dev (substr installdevice 0 len))
(complete 38)
)
(
;else user-level is expert (2) then prompt which Installed lib to use
(while (= out 0)
(set uselib
(askchoice
(prompt "\nPlease Choose Which Library to Use on Compression.\n")
(help asklib-help)
(choices
(if (IN libflag 0)("EPU0")(deflib))
(if (IN libflag 1)("EPU1")(deflib))
(if (IN libflag 2)("NUKE")(deflib))
(if (IN libflag 3)("RDCN")(deflib))
(if (IN libflag 4)("BLZW")(deflib))
(if (IN libflag 5)("FAST")(deflib))
(if (IN libflag 6)("SHRI")(deflib))
(if (IN libflag 7)("NONE")(deflib))
(default -1)
)
)
)
;check if libs are installed
;by calcing 0-7(choice) > 0-128 values(options)
;------------------------------------------------(this is a bit smart eh !!??)
(set flag2 uselib) ;set 2^n multiply amount
(set libcheck 1)
(while flag2
(set libcheck(* 2 libcheck))
(set flag2(- flag2 1))
) ;loop and count in binary (2^n)
;------------------------------------------------
;then check the two binary values by ANDing them together to check for matching bits
(set out (BITAND libflag libcheck))
)
; program check
;(message "uselib (0-7) = "uselib "\n out =" out "\nlibflag=" libflag
;"libcheck =" libcheck)
; install required compression librarys
(if (= uselib 0)
(set lib "EPU0")
)
(if (= uselib 1)
(set lib "EPU1")
)
(if (= uselib 2)
(set lib "NUKE")
)
(if (= uselib 3)
(set lib "RDCN")
)
(if (= uselib 4)
(set lib "BLZW")
)
(if (= uselib 5)
(set lib "FAST")
)
(if (= uselib 6)
(set lib "SHRI")
)
(if (= uselib 7)
(set lib "NONE")
)
(set len (- (strlen installdevice) 1))
(set dev (substr installdevice 0 len))
)
)
(complete 40)
(if (<> @pretend 1)
;so if not in pretend mode then do this bit.
(
;-----------------------------------------------------------
;write EPU execute script file for chosen device
(if (exists (tackon @default-dest "s/startup-old"))
(
(protect (tackon @default-dest "s/startup-old") "+w +d")
(delete (tackon @default-dest "s/startup-old"))
)
(set null 0)
)
(if (exists (tackon @default-dest "s/startup-sequence"))
(
(protect (tackon @default-dest "s/startup-sequence") "+w")
(rename (tackon @default-dest "s/startup-sequence") (tackon @default-dest "s/startup-old"))
)
(Abort startupfileerr)
)
(complete 52)
;-----------------------------------------------------------
;write EPU execute script file for chosen device
(textfile
(help)
(prompt)
(dest (tackon @default-dest "start"))
(append (cat "EPU device " dev " lib " lib))
)
(if (exists "T:")
(Set null 0)
(makeassign "T" (Tackon @default-dest "T"))
)
(complete 50)
;-----------------------------------------
;create new Startup-sequence with epu run line
(textfile
(help)
(prompt)
(dest (tackon @default-dest "s/startup-sequence"))
(append (cat "EPU device " dev " lib " lib " Hmode\n"))
(include (tackon @default-dest "s/startup-old"))
)
(protect (tackon @default-dest "s/startup-sequence") "+r -w +e -d")
(protect (tackon @default-dest "devs/system-configuration") "+r -w +e -d")
(protect (tackon @default-dest "libs/version.library") "+r -w +e -d")
(complete 55)
;-----------------------------------------------------------
;run EPU 'start' script file - EVERYTHING WRITTEN TO INSTALLDEVICE
; WILL NOW BE COMPRESSED WITH THIS LIBRARY !!!!!!!!!!!
(execute (tackon @default-dest "start"))
;--------------------------------
))
;write 'compress' script to recomp selected drive
;and delete extra .EpuTmp files
(set update (cat "\n\n\nEPU Installed on " installdevice " using " lib ".library"
"\n\n\nStarting EPU Compression\n\n\n Press 'Proceed' to Compress Device")
)
(textfile
(help "\nThe EPU program will compress your chosen device or partition "
"when you press proceed.\n\n"
"REMEMBER that the compression may take some time, especially "
"if you are compressing are large hard drive - maybe 3 hours!\n\n"
"The program will delete any TMP (temporary) files created by "
"the compression so don't reset your drive until the drive stops "
"and you are told to do so.\n\n"
" Press PROCEED to compress your device"
)
(prompt update)
(dest (tackon @default-dest "compress"))
(append(cat "stack 500000\n"
"Recomp >CON: " installdevice " all\n"
"STAKKER:C/delete " installdevice "#?.EpuTmp\n"
"STAKKER:C/delete " installdevice "#?/#?.EpuTmp\n"))
(confirm)
)
(complete 60)
;------------------------------------
;execute Compress file
(set workmsg (cat "\n\n\n Recompressing All of " installdevice "\n\n Please Wait ...."
"\n\nIF The EPU Compression fails and Will not Exit..."
"\n\nIt IS safe to 'ReBoot' your computer"
"\nONLY if the Working drive has STOPPED."
"\nAs damage to the Data/File Structure may occur")
)
(working workmsg)
(complete 70)
(execute (tackon @default-dest "compress"))
(complete 99)
;now remove all extra files
; (delete (tackon @default-dest "start"))
; (delete (tackon @default-dest "compress"))
;------------------------------------------------------------
(complete 100)
(
(set install
(askbool
(prompt again)
(help "This option allows you to compress another partition"
" or device without having to repeat the install routine."
)
(default 1)
)
)
(if install
(set install 1) ; do it all again
(set install 0) ; finish
)
)
)
(exit reboot)
;------------------------------------------------------------